package com.probox.common.entity.vo.recharge;

import cn.hutool.core.util.ObjectUtil;
import com.probox.common.core.enums.ReleaseShopTypeEnum;
import com.probox.common.core.utils.money.MoneyUtils;
import com.probox.common.entity.domain.recharge.RechargeRecord;
import lombok.Data;

@Data
public class RechargeRecordVo extends RechargeRecord {

    public String getRechargeMoneyStr() {
        return MoneyUtils.changeF2B(getRechargeMoney());
    }

    public String getGoldCoinStr() {
        return MoneyUtils.changeF2B(getGoldCoin());
    }

    public String getSilverCoinStr() {
        return MoneyUtils.changeF2B(getSilverCoin());
    }

    private String rightType;

    private String rightName;

    public String getRightTypeStr() {
        if(ObjectUtil.isEmpty(rightType)){
            return "";
        }
        String[] split = rightType.split(",");
        StringBuffer buffer = new StringBuffer();
        if (split.length > 0) {
            for (int i = 0; i < split.length; i++) {
                buffer.append("," + ReleaseShopTypeEnum.getNameByKey(split[i]));
            }
        }
        String s = buffer.toString();
        return s.substring(1, s.length());
    }

    private String customerName;

    private String phone;

    private String storeName;

    private String startTime;

    private String endTime;

    private String customerLevelName;


}
